﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Business.vo;
using Business.dao;

namespace Business.bo
{
    public class UserBo : BaseBo
    {

        public User GetById(Int32 id)
        {
            UserDao userDao = new UserDao();

            User user = userDao.GetById(id);

            return user;
        }

        public User GetByLogin(String login)
        {
            UserDao userDao = new UserDao();

            User user = userDao.GetByLogin(login);

            return user;
        }

        public IList<User> GetAll()
        {
            UserDao userDao = new UserDao();

            IList<User> users = userDao.GetAll();

            return users;
        }

        public void Save(User user)
        {
            UserDao userDao = new UserDao();
            userDao.Save(user);
        }

        public void Delete(Int32 id)
        {
            UserDao userDao = new UserDao();
            userDao.Delete(id);
        }

      
    }
}
